﻿using Core.Domain.Common;
using Core.Domain.Directory;
using System;
using System.Collections;
using System.Collections.Generic;
namespace Core.Domain.Customers
{
    /// <summary>
    /// 简历实体
    /// </summary>
    public partial class Resume : BaseEntity
    {
        /// <summary>
        /// 简历名称
        /// </summary>
        public string ResumeName { get; set; }

        /// <summary>
        /// 所属用户
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// 所属用户
        /// </summary>
        public virtual Customer Customer { get; set; }

        #region base info
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public int SexId { get; set; }

        /// <summary>
        /// 工作年份
        /// </summary>
        public int WorkYear { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 常驻城市
        /// </summary>
        public int CityId { get; set; }

        /// <summary>
        /// 当前状态
        /// </summary>
        public int WorkStateId { get; set; }
        #endregion

        #region 求职信息
        /// <summary>
        /// 求职类型
        /// </summary>
        public int WorkTypeId { get; set; }
        /// <summary>
        /// 求职城市
        /// </summary>
        public int WorkCityId { get; set; }

        /// <summary>
        /// 自我评价
        /// </summary>
        public string Evaluation { get; set; }
        #endregion

        #region 其他信息
        /// <summary>
        /// 总浏览量
        /// </summary>
        public int ReadTimes { get; set; }

        /// <summary>
        /// 简历排名
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// 是否删除简历
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// 是否开启简历
        /// </summary>
        public bool Active { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateOn { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateOn { get; set; }

        #endregion

        private ICollection<WorkExperience> _workExperience;

        private ICollection<Education> _education;

        /// <summary>
        /// 教育背景
        /// </summary>
        public ICollection<Education> Education
        {
            get { return _education ?? (_education = new List<Education>()); }
            set { _education = value; }
        }

        /// <summary>
        /// 工作经历
        /// </summary>
        public ICollection<WorkExperience> WorkExperience
        {
            get { return _workExperience ?? (_workExperience = new List<WorkExperience>()); }
            set { _workExperience = value; }
        }


        public Sex Sex
        {
            get { return (Sex)SexId; }
            set { this.SexId = (int)value; }
        }
        public WorkState WorkState
        {
            get { return (WorkState)WorkStateId; }
            set { this.WorkStateId = (int)value; }
        }
        public WorkType WorkType
        {
            get { return (WorkType)WorkTypeId; }
            set { this.WorkTypeId = (int)value; }
        }
    }
}
